import BasicLayout from "../layouts/BasicLayout";
import {createRoutes} from "../utils/core";
import Dashboard from './Dashboard';

import TestData from './TestData';

import Area from "./Hospital/Area";
import HList from "./Hospital/HList";
import HospitalDetail from "./Hospital/Detail";

import DList from "./Device/DList";
import Map from "./Device/Map";

import SList from "./ControllSoft/List";

import SaleManager from "./Reagent/Sale";
import ReagentType from "./Reagent/Type";

import QList from "./Quality/QList";
import QData from "./Quality/QData";

import Channel from "./Data/Channel";
import DeviceData from "./Data/DeviceData";
import DataDetail from "./Data/Detail";
import FillLayout from "../layouts/FillLayout";


const routesConfig = (app) => ([

  // {
  //   path: '/sign',
  //   title: '登录',
  //   indexRoute: '/sign/login',
  //   component: UserLayout,
  //   childRoutes: [
  //     Login(app),
  //   ]
  // },

  {
    path: '/detail',
    component: FillLayout,
    childRoutes: [
      DataDetail(app),
      HospitalDetail(app),
    ]
  },

  {
    path: '/',
    title: '系统中心',
    component: BasicLayout,
    indexRoute: '/dashboard',
    childRoutes: [

      Area(app),
      HList(app),

      DList(app),
      Map(app),

      SList(app),

      SaleManager(app),
      ReagentType(app),

      QList(app),
      QData(app),

      Channel(app),
      DeviceData(app),

      Dashboard(app),

      TestData(app),

    ],
  },

])



export default app => createRoutes(app, routesConfig);
